<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/vue.js"></script>
    <style>
        .wrap {
            width: 100px;
            height: 100px;
            background: #000;
        }
    </style>
</head>

<body>
    <div id="app">
        <div class="wrap" @click="divClick">
            <button @click="butClick">点击</button>
        </div>
    </div>
</body>

<script>
    // 事件修饰符.stop :阻止事件冒泡
    var vm = new Vue({
        el: "#app",
        data: {

        },
        methods: {
            divClick() {
                console.log("divClick");
            },
            butClick(eve) {
                // 原生方式实现阻止冒泡
                eve.stopPropagation();
                console.log("butClick");

            }
        }

    })
</script>

</html>